using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._DataManagement._Features
{
    /// <summary>
    /// <para>Remove Cutback Vertices</para>
    /// <para>Removes unwanted cutbacks for polyline and polygon feature classes or layers.</para>
    /// <para>移除折线和面要素类或图层的不需要的剪切。</para>
    /// </summary>    
    [DisplayName("Remove Cutback Vertices")]
    public class RemoveCutbackVertices : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public RemoveCutbackVertices()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The polyline or polygon feature class from which the tool will remove cutback vertices. This feature class (or layer) will be modified.</para>
        /// <para>折线或面要素类，工具将从中移除剪切折点。将修改此要素类（或图层）。</para>
        /// </param>
        /// <param name="_minimum_angle">
        /// <para>Minimum Angle</para>
        /// <para>The minimum angle threshold value (in degrees). The angle value should be within the range of 0–180. If the angle formed by a vertex and its two neighboring points is below the specified minimum angle, the vertex is a candidate for cutback removal.</para>
        /// <para>最小角度阈值（以度为单位）。角度值应在 0–180 范围内。如果顶点及其两个相邻点形成的角度低于指定的最小角度，则该顶点是削减移除的候选点。</para>
        /// </param>
        public RemoveCutbackVertices(object _in_features, double? _minimum_angle)
        {
            this._in_features = _in_features;
            this._minimum_angle = _minimum_angle;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Remove Cutback Vertices";

        public override string CallName => "topographic.RemoveCutbackVertices";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_features, _minimum_angle, _removal_method.GetGPValue(), _skip_coincident_vertices.GetGPValue(), _updated_features];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The polyline or polygon feature class from which the tool will remove cutback vertices. This feature class (or layer) will be modified.</para>
        /// <para>折线或面要素类，工具将从中移除剪切折点。将修改此要素类（或图层）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Minimum Angle</para>
        /// <para>The minimum angle threshold value (in degrees). The angle value should be within the range of 0–180. If the angle formed by a vertex and its two neighboring points is below the specified minimum angle, the vertex is a candidate for cutback removal.</para>
        /// <para>最小角度阈值（以度为单位）。角度值应在 0–180 范围内。如果顶点及其两个相邻点形成的角度低于指定的最小角度，则该顶点是削减移除的候选点。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Angle")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double? _minimum_angle { get; set; }


        /// <summary>
        /// <para>Removal Method</para>
        /// <para><xdoc>
        ///   <para>Indicates whether cutbacks should be removed one at a time or all at once.</para>
        ///   <bulletList>
        ///     <bullet_item>Sequential—Cutbacks will be checked sequentially for a feature. After a cutback is removed, the change in geometry is taken into consideration when determining cutbacks in the remaining vertices of a feature. This is the default.</bullet_item><para/>
        ///     <bullet_item>All—Cutbacks will be checked for all vertices at once.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指示是应一次删除一个削减，还是一次删除所有削减。</para>
        ///   <bulletList>
        ///     <bullet_item>顺序 - 将按顺序检查要素的削减。移除剪切后，在确定要素剩余折点的剪切时，将考虑几何的更改。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>全部 - 将同时检查所有折点的削减。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Removal Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _removal_method_value _removal_method { get; set; } = _removal_method_value._SEQUENTIAL;

        public enum _removal_method_value
        {
            /// <summary>
            /// <para>Sequential</para>
            /// <para>Sequential—Cutbacks will be checked sequentially for a feature. After a cutback is removed, the change in geometry is taken into consideration when determining cutbacks in the remaining vertices of a feature. This is the default.</para>
            /// <para>顺序 - 将按顺序检查要素的削减。移除剪切后，在确定要素剩余折点的剪切时，将考虑几何的更改。这是默认设置。</para>
            /// </summary>
            [Description("Sequential")]
            [GPEnumValue("SEQUENTIAL")]
            _SEQUENTIAL,

            /// <summary>
            /// <para>All</para>
            /// <para>All—Cutbacks will be checked for all vertices at once.</para>
            /// <para>全部 - 将同时检查所有折点的削减。</para>
            /// </summary>
            [Description("All")]
            [GPEnumValue("ALL")]
            _ALL,

        }

        /// <summary>
        /// <para>Skip vertices coincident between multiple features</para>
        /// <para><xdoc>
        ///   <para>Indicates whether to remove cutback vertices when the vertex is snapped to another feature within the same feature class.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Vertices that have angles less than the specified Minimum Angle will not be removed from the feature geometry if they are snapped to other features.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Cutback points will be deleted without considering whether they are snapped to other features. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指示当折点捕捉到同一要素类中的另一个要素时，是否移除剪切折点。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 角度小于指定最小角度的顶点，如果被捕捉到其他要素，则不会从特征几何中移除这些顶点。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将删除切回点，而不考虑是否将其捕捉到其他特征。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Skip vertices coincident between multiple features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _skip_coincident_vertices_value _skip_coincident_vertices { get; set; } = _skip_coincident_vertices_value._false;

        public enum _skip_coincident_vertices_value
        {
            /// <summary>
            /// <para>SKIP_COINCIDENT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SKIP_COINCIDENT")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>REMOVE_COINCIDENT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REMOVE_COINCIDENT")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Updated Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_features { get; set; }


        public RemoveCutbackVertices SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}